package java_9_12;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.Scanner;

/*
0：输出今天的日期和周几，周几用汉字表示
*/
public class Test_2 {
    public static void main(String[] args) {
        Calendar c=Calendar.getInstance();
        String []str={"星期日","星期一","星期二","星期三","星期四","星期五","星期六"};
        int day=c.get(Calendar.DAY_OF_WEEK);
        SimpleDateFormat s=new SimpleDateFormat("yyyy年MM月dd日");
        Date d=new Date();
        String s1 = s.format(d);
        System.out.println(s1);
        System.out.println("今天是"+str[day-1]);
    }
}
